var show_order_layer,order_id,tr_pos,pos;
$('.order_sn').live('mouseover',function(){
	window.clearTimeout(show_order_layer);
	$('#order_list tr').removeClass('c');
	var obj=$(this).parents('td');
	order_id=obj.prev().text();
	var tr_obj=obj.parents('tr');
	tr_obj.addClass('c');
	tr_pos=tr_obj.index();
	pos=$(this).offset();
	if ($('#order_prev').length==0){
		$('body').append('<div id="order_prev"></div>');
	}
	show_order_layer=window.setTimeout(query_order_info,1500);
}).live('mouseout',function(){
	window.clearTimeout(show_order_layer);
});
$('#order_prev').live('mouseleave',function(){
	$(this).fadeOut('',function(){$(this).empty();});
	$('#order_list tr').removeClass('c');
});
function query_order_info(){
	$.ajax({
		type:'POST',
		url:GET_ORDER_DETAIL_URL,
		data:'order_id='+order_id,
		error:function(){
			
		},
		dataType:'json',
		success:function(data){
			if (data.length>0){
				var str='<table class="result"><thead><tr><td>图片</td><td>商品名称</td><td>货号</td><td>价格</td><td>数量</td><td>单位</td><td>属性</td><td>小计</td></tr></thead><tbody>';
				$(data).each(function(k,v){
					var img_url=NO_IMG_URL;
					if (v.img!='')img_url=v.img;
					str+='<tr><td><a href="'+get_product_url(v.goods_id)+'" target="_blank"><img width="60" src="'+v.img+'"/></a></td><td><a href="'+get_product_url(v.goods_id)+'" target="_blank">'+v.goods_name+'</a></td><td>'+v.sku_num+'</td><td>'+v.pmt_price+'</td><td>'+v.order_unit_number+'</td><td>'+v.order_unit_name+'</td><td>'+v.goods_attr+'</td><td>'+v.goods_amount+'</td></tr>';
				});
				str+='</tbody></table>';
				$('#order_prev').attr('tr_pos',tr_pos).css({'left':(pos.left+108),top:pos.top-6}).html(str).show();
			}
		}
	});
}